/*
package org.itboys.product.web;

import org.itboys.commons.CommonConstants;
import org.itboys.commons.utils.ajax.AjaxUtils;
import org.itboys.framework.query.JsonPageUtils;
import org.itboys.framework.spring.controller.BaseController;
import org.itboys.fuzion.entity.FuzionMember;
import org.itboys.fuzion.service.FuzionMemberService;
import org.itboys.mongodb.utils.page.Page;
import org.itboys.product.constant.ProductConstant;
import org.itboys.product.entity.Order;
import org.itboys.product.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

*/
/**
 * Created by huml on 2016/4/20.
 * 后台订单控制层
 *//*

@RestController
@RequestMapping("/product/order")
public class OrderController extends BaseController {

    @Autowired
    private OrderService orderService;
    @Autowired
    private FuzionMemberService memberService;

    */
/**
     * 跳转
     * @param model
     * @return
     *//*

    @RequestMapping("/orderVM")
    public ModelAndView orderVM(Model model){
        return new ModelAndView("ace/product/order");
    }

    */
/**
     * 订单列表
     * @param request
     * @param response
     *//*

    @RequestMapping("/list")
    public void list(HttpServletRequest request, HttpServletResponse response){
        Page<Order> page = orderService.pageQuery(request);
        for (Order order :
                page.getData()) {
            FuzionMember member = memberService.getById(order.getMemberId());
            if(member != null){
                order.setMemberName(member.getNickname());
            }
        }
        JsonPageUtils.renderJsonPage(page.getTotal(), page.getData(), response);
    }

    */
/**
     * 确认发货
     * @param orderId  订单id
     * @param express  物流公司
     * @param expressNo  运单号
     * @param response
     *//*

    @RequestMapping("/doSend")
    public void doSend(@RequestParam("orderId")Long orderId,
                       @RequestParam("express")String express,
                       @RequestParam("expressNo")String expressNo,
                       HttpServletResponse response){
        try {
            Order order = orderService.getById(orderId);
            order.setStatus(ProductConstant.OrderStatic.ORDER_STATUS_SEND);
            order.setExpress(express);
            order.setExpressNo(expressNo);
            orderService.update(order);
            AjaxUtils.renderJson(response, CommonConstants.SUCCESS);
        } catch (Exception e) {
            logger.error("/product/order/doSend error", e);
            AjaxUtils.renderJson(response, CommonConstants.FAIL);
        }
    }

}
*/
